#ifndef CCR_H
#define CCR_H

class ConditionalCriticalRegion
{
	public:
		ConditionalCriticalRegion();
		~ConditionalCriticalRegion();

		bool8 initOk();

		void begin();
		void end();

		typedef bool8 (*Condition)(void* User);
		void await(Condition Proc, void* User);

	protected:
		HANDLE	mutex, delay;
		int32	count, temp;
};

#endif
